package com.itheima.service.test;


import com.itheima.dao.UserMapper;
import com.itheima.domain.User;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:spring/application-dao.xml")
public class test {


    @Autowired
    private UserMapper userMapper;
    @Test//单表查询
    public void fandById(){
        User user = userMapper.selectByPrimaryKey(1);
        System.out.println(user);

    }

}
